import { computed } from "@vue/runtime-core";
import { designComponent } from "src/use/designComponent";
import { useStyle, StyleProps } from "src/use/useStyle";

export default designComponent({
  props: {
    ...StyleProps
  },
  setup({ props, setupContext }) {
    const { styleComputed } = useStyle();

    const classes = computed(() => [
      "cv-use-style-child",
      "cv-use-style-child-status-" + styleComputed.value.status
    ]);

    return {
      render: () => <div class={classes.value}>{setupContext.slots.default!()}</div>
    };
  }
});
